<?php
require_once("/../../../../includes/controller/initialize.php"); 

  
 if( isset( $_GET['id'])){
$con_id=  $_GET['id'];
  }


$sta = new StatsController();


$o = $sta->getSexPercentageOnID($con_id);

$json = $sta->convertToJson($o);


?>


    <script src="/public/view/javascript/Graph.js"></script>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
       <script> 

              
                var title = "Brukere prosentvis per kjønn";
                var pietab = <?php echo $json;?>;
                var x ;
                var y;

       </script>

   <script type="text/javascript">
        $(document).ready(function() {
            obj.drawPieChart(pietab, title);
        });

    </script>
     
        

  
       

           
        <canvas id="canvas" width="500" height="300" ></canvas>
      
